home *** CD-ROM | disk | FTP | other *** search
/ Cyber Whores / Cyber Whores.iso / autorun / vv1.~pa < prev    next >
Text File  |  1996-03-25  |  4KB  |  161 lines

  1. unit Vv1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, FileCtrl, StdCtrls, Buttons, ExtCtrls, MPlayer,prdi;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Image1: TImage;
  12.     BitBtn1: TBitBtn;
  13.     BitBtn2: TBitBtn;
  14.     MediaPlayer1: TMediaPlayer;
  15.     Bevel1: TBevel;
  16.     BitBtn3: TBitBtn;
  17.     DirectoryListBox1: TDirectoryListBox;
  18.     BitBtn4: TBitBtn;
  19.     Label1: TLabel;
  20.     BitBtn6: TBitBtn;
  21.     FileListBox1: TFileListBox;
  22.     Button1: TButton;
  23.     Timer1: TTimer;
  24.     procedure BitBtn1Click(Sender: TObject);
  25.     procedure FormCreate(Sender: TObject);
  26.     procedure BitBtn2Click(Sender: TObject);
  27.     procedure Timer1Timer(Sender: TObject);
  28.     procedure BitBtn3Click(Sender: TObject);
  29.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  30.     procedure DirectoryListBox1Change(Sender: TObject);
  31.     procedure FileListBox1DblClick(Sender: TObject);
  32.     procedure Button1Click(Sender: TObject);
  33.     procedure BitBtn6Click(Sender: TObject);
  34.     procedure BitBtn4Click(Sender: TObject);
  35.   private
  36.     { Private declarations }
  37.   public
  38.     { Public declarations }
  39.   end;
  40.  
  41. var
  42.   Form1: TForm1;
  43.   st,go:Boolean;
  44.   star,ben:Integer;
  45.  
  46. implementation
  47.  
  48. {$R *.DFM}
  49.  
  50. procedure TForm1.BitBtn1Click(Sender: TObject);
  51. begin
  52. Close;
  53. end;
  54.  
  55. procedure TForm1.FormCreate(Sender: TObject);
  56. begin
  57.      with mediaplayer1 do
  58.      begin
  59.      filename:='\autorun\multi.wav';
  60.      open;
  61.      end;
  62.      st:=True;
  63.      star:=0;
  64.      go:=false;
  65. end;
  66.  
  67. procedure TForm1.BitBtn2Click(Sender: TObject);
  68. begin
  69.      if bitbtn2.caption='Music On' then
  70.      begin
  71.         mediaplayer1.stop;
  72.         st:=False;
  73.         bitbtn2.caption:='Music Off';
  74.      End
  75.      else
  76.      begin
  77.         mediaplayer1.play;
  78.         st:=True;
  79.         bitbtn2.caption:='Music On';
  80.      End;
  81. end;
  82.  
  83. procedure TForm1.Timer1Timer(Sender: TObject);
  84. begin
  85.      with mediaplayer1 do
  86.      if tracklength[1]=Position then
  87.      begin
  88.      filename:='\autorun\v3.wav';
  89.      open;
  90.      play;
  91.      end;
  92.      if st then mediaplayer1.play
  93.      else mediaplayer1.stop;
  94. end;
  95.  
  96. procedure TForm1.BitBtn3Click(Sender: TObject);
  97. var
  98.    f:Textfile;
  99.    i:integer;
  100. begin
  101.      assignfile(f,'c:\temp.ben');
  102.      rewrite(f);
  103.      tag:=1;
  104.      for i:=0 to filelistbox1.items.count-1 do
  105.      writeln(f,filelistbox1.items[i]);
  106.      closefile(f);
  107.      priDial.show;
  108. end;
  109.  
  110. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  111. begin
  112.      if tag=1 then
  113.      Deletefile('c:\temp.ben');
  114. end;
  115.  
  116. procedure TForm1.DirectoryListBox1Change(Sender: TObject);
  117. begin
  118.      FileListBox1.Directory:=DirectoryListBox1.Directory;
  119. end;
  120.  
  121. procedure TForm1.FileListBox1DblClick(Sender: TObject);
  122. var
  123.  I,L:Integer;
  124.  s,S2:String;
  125.  cmd:array[0..255] of char;
  126. begin
  127.      for I:=0 to FileListBox1.Items.count-1 do
  128.      If FileListBox1.Selected[I] then
  129.      Begin
  130.           S:=fileListBox1.items[I];
  131.           L:=Length(s);
  132.           s2:=s[L-2]+s[L-1]+s[L];
  133.           If (s2='bmp') or (s2='pcx') or (s2='gif') then
  134.           begin
  135.           caption:='You choosed '+s2+' file';
  136.           StrPcopy(cmd,'\vpic\vpic '+directorylistbox1.directory+'\'+s);
  137.           Winexec(cmd,SW_ShowMaximized)
  138.           end
  139.           else
  140.           caption:='This is the invalid file';
  141.      End;
  142. end;
  143.  
  144. procedure TForm1.Button1Click(Sender: TObject);
  145. begin
  146. WinExec('Winfile',SW_ShowMaximized);
  147. end;
  148.  
  149. procedure TForm1.BitBtn6Click(Sender: TObject);
  150. begin
  151.      chdir(directorylistbox1.directory);
  152.      WinExec('\vpic\vpic',SW_ShowMaximized);
  153. end;
  154.  
  155. procedure TForm1.BitBtn4Click(Sender: TObject);
  156. begin
  157.      winexec('\ployvie\polyview',SW_ShowMaximized);
  158. end;
  159.  
  160. end.
  161.